# -*- coding: utf-8 -*-
__author__ = 'Paul'
from plone.directives.dexterity import DisplayForm
from Acquisition import aq_inner
from zope.interface import Interface
from five import grok

class BaseClassView(object):
    """Una clase base para las vistas de cada producto"""


    def getExtras(self):
        """Todos los archivos descargables"""
        from Products.bpContents.getImgTira import GetTiraImgs
        context = GetTiraImgs(self.context)
        results = context.getExtraInfo()
        if results:
            return results
        else:
            return None


    def getImages(self):
        """Toda las imagenes
        """
        from Products.bpContents.getImgTira import GetTiraImgs
        context = GetTiraImgs(self.context)
        results = context.getTira()
        if results:
            return results
        else:
            return None

    def getCreatorInfo(self):
        """Devuelve los datos del responsable del artículo"""
        from Products.bpContents.CreatorInfo import CreatorInfo
        dataMember=CreatorInfo(self.context)
        return dataMember.getCreatorInfo()